﻿using UnityEngine;
using UnityEditor;

public class MoanaWindowEditor
{
    [MenuItem("Moana Games/Reset the game")]
    static void ClearAllPlayerPrefs()
    {
        PlayerPrefs.DeleteAll();
        PlayerPrefs.Save();
    }

    [MenuItem("Moana Games/Unlock all slices in collection")]
    static void UnlockAllSlices()
    {
        var mainController = Object.FindObjectOfType<MainController>();
        if (mainController != null)
        {
            for(int i = 0; i < mainController.sliceCollection.Length; i++)
            {
                Prefs.SetSliceUnlocked(i, true);
            }
        }
    }
}